home *** CD-ROM | disk | FTP | other *** search
- /* (C) Copyright 1991 Dave Fritsche (wb8zxu), All Rights Reserved.
- *
- * Redistribution and use in source and binary forms are permitted for
- * non-commercial use, provided that the above copyright notice and this
- * paragraph are duplicated in all such forms. THIS SOFTWARE IS PROVIDED
- * ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
- #include <stdio.h>
- #include <ctype.h>
- #include "screen.h"
-
- proc02()
- {
- unsigned int m, n, k;
- unsigned long ip1, ip2, ip3, ip4;
-
- /* STRIP PASSWORD DOWN */
- if (rmt_pass)
- {
- chktxt(ifd[rmt_pass-1]);
- strcpy(password, ifd[rmt_pass-1]);
- }
-
- /* STRIP EDITOR PATH */
- chktxt(ifd[ed_path-1]);
- strcpy(editor, ifd[ed_path-1]);
-
- /* STRIP PAGER PATH */
- if (netnews)
- {
- chktxt(ifd[pgr-1]);
- strcpy(pager, ifd[pgr-1]);
- }
-
- /* STRIP TIME ZONE */
- chktxt(ifd[tz-1]);
- ifd[tz-1][0] = (unsigned char)toupper( (unsigned int)ifd[tz-1][0] );
- ifd[tz-1][1] = (unsigned char)toupper( (unsigned int)ifd[tz-1][1] );
- ifd[tz-1][2] = (unsigned char)toupper( (unsigned int)ifd[tz-1][2] );
- strcpy(timezone, ifd[tz-1]);
-
- /* CONVERT IP ADDRESS TO LONG INT */
- if (gate_rqd)
- {
- buf[3] = NULL;
- buf[0] = ifd[gate_rqd-1][1]; buf[1] = ifd[gate_rqd-1][2]; buf[2] = ifd[gate_rqd-1][3];
- sscanf(buf, "%ld", &ip1);
- buf[0] = ifd[gate_rqd-1][5]; buf[1] = ifd[gate_rqd-1][6]; buf[2] = ifd[gate_rqd-1][7];
- sscanf(buf, "%ld", &ip2);
- buf[0] = ifd[gate_rqd-1][9]; buf[1] = ifd[gate_rqd-1][10]; buf[2] = ifd[gate_rqd-1][11];
- sscanf(buf, "%ld", &ip3);
- buf[0] = ifd[gate_rqd-1][13]; buf[1] = ifd[gate_rqd-1][14]; buf[2] = ifd[gate_rqd-1][15];
- sscanf(buf, "%ld", &ip4);
- gateway = (long)( (ip1 << 24) | (ip2 << 16) | (ip3 << 8) | ip4 );
- }
-
- /* COM1 */
- if (com1)
- {
- sscanf(ifd[com1-1], "%ld", &com1spd);
- chktxt(ifd[com1]);
- strcpy(com1typ, ifd[com1]);
- }
-
- /* COM2 */
- if (com2)
- {
- sscanf(ifd[com2-1], "%ld", &com2spd);
- chktxt(ifd[com2]);
- strcpy(com2typ, ifd[com2]);
- }
-
- /* COM3 */
- if (com3)
- {
- sscanf(ifd[com3-1], "%ld", &com3spd);
- chktxt(ifd[com3]);
- strcpy(com3typ, ifd[com3]);
- }
-
- /* COM4 */
- if (com4)
- {
- sscanf(ifd[com4-1], "%ld", &com4spd);
- chktxt(ifd[com4]);
- strcpy(com4typ, ifd[com4]);
- }
-
- /* DRSI 0 */
- if (drsi_0)
- {
- sscanf(ifd[drsi_0-1], "%ld", &drsi_0spd);
- chktxt(ifd[drsi_0]);
- strcpy(drsi_0typ, ifd[drsi_0]);
- }
-
- /* DRSI 1 */
- if (drsi_1)
- {
- sscanf(ifd[drsi_1-1], "%ld", &drsi_1spd);
- chktxt(ifd[drsi_1]);
- strcpy(drsi_1typ, ifd[drsi_1]);
- }
-
- /* PC100 0 */
- if (pc100_0)
- {
- sscanf(ifd[pc100_0-1], "%ld", &pc100_0spd);
- chktxt(ifd[pc100_0]);
- strcpy(pc100_0typ, ifd[pc100_0]);
- }
-
- /* PC100 1 */
- if (pc100_1)
- {
- sscanf(ifd[pc100_1-1], "%ld", &pc100_1spd);
- chktxt(ifd[pc100_1]);
- strcpy(pc100_1typ, ifd[pc100_1]);
- }
-
- printf(" Callsign: %s\n", callsign);
- printf(" IP Address: [%ld.%ld.%ld.%ld]", ((ip >> 24) & 0xff),
- ((ip >> 16) & 0xff), ((ip >> 8) & 0xff), (ip & 0xff));
- if (gate_rqd)
- printf(" Gateway Address: [%ld.%ld.%ld.%ld]", ((gateway >> 24) & 0xff),
- ((gateway >> 16) & 0xff), ((gateway >> 8) & 0xff), (gateway & 0xff));
- printf("\n\n Name: %s\n", name);
- printf(" Street: %s\n", street);
- printf(" City: %s", city);
- printf(" State: %s", state);
- printf(" Zip-code: %s\n", zip);
- printf(" Phone: %s\n\n", phone);
- printf(" Path: %s", path);
- if (rmt_pass)
- printf(" Password: %s", password);
- printf(" Timezone: %s\n\n", timezone);
- if (com1)
- printf(" Serial port: Com1\n");
- if (com2)
- printf(" Serial port: Com2\n");
- if (com3)
- printf(" Serial port: Com3\n");
- if (com4)
- printf(" Serial port: Com4\n");
- if (drsi_0)
- printf(" DRSI: first port\n");
- if (drsi_1)
- printf(" DRSI: second port\n");
- if (pc100_0)
- printf(" PC100: first port\n");
- if (pc100_1)
- printf(" PC100: second port\n");
- if (gate_rqd)
- printf("\n A default IP gateway is desired\n");
- else
- printf("\n No default IP gateway specified\n");
- if (nr_rqd)
- printf(" Netrom is required\n");
- else
- printf(" Netrom is not required\n");
- if (rmt_pass)
- printf(" A remote password is required\n");
- else
- printf(" A remote password is not required\n");
- }
-